export function analysisScanCodeRules(scanCode){
    const code = scanCode || "";
    const analysisFlag = "/";
    const analysisResult = {};
    console.log("要解析的码:" , code);
    if(code === ""){
        return;
    }
    const splitCode = code.split(analysisFlag);
    const materialInfo = splitCode[0]?.trim().replace('\n','') || '';
    const batchInfo = splitCode[1]?.trim().replace('\n','') || '';
    const numInfo = splitCode[2]?.trim().replace('\n','') || '';
    analysisResult.materialInfo = materialInfo;
    analysisResult.batchInfo = batchInfo;
    analysisResult.numInfo = numInfo;
    console.log("解析结果:",analysisResult);
    return analysisResult;
}